<?php
/**
 * 用于测试进销存API
 * User: z
 * Date: 14-9-6
 * Time: 下午3:45
 */
class Controller_newerpapitest extends Controller
{
    public function Action_index()
    {
        echo "#".date("Y-m-d H:i:s");
        require_once(Kohana::find_file('vendor','phprpc/phprpc_client'));

        /**
         * 本地测试服务器地址
         */
        $server_url = "http://127.0.0.1:801/commonapi/newerpapi/api2";

        /**
         * 测试服务器地址
         */
        $server_url = "http://192.168.5.8:802//commonapi/newerpapi/api2";

        $client = new PHPRPC_Client($server_url);

        /**
         * 进销存API
         */
        $re =  $client->get_inventory_zero();
//        $re =  $client->get_support_days();

        echo "#".date("Y-m-d H:i:s");
        echo var_dump($re);
    }
}